Alexander Larsson [Thu, 4 Jul 2013 10:54:59 +0000 (12:54 +0200)]
widget: Don't crash if setting alpha on non-realized widget.
https://bugzilla.gnome.org/show_bug.cgi?id=703154
Bastien Nocera [Mon, 1 Jul 2013 17:46:13 +0000 (19:46 +0200)]
GtkSearchBar: Fix automatic entry connection
Adding an entry to the search bar didn't automatically connect
the signals as expected as the code was in the wrong branch.
https://bugzilla.gnome.org/show_bug.cgi?id=703406
Matthias Clasen [Wed, 3 Jul 2013 23:52:11 +0000 (19:52 -0400)]
Avoid deprecation warning
There was one overlooked use of GTK_STOCK_MISSING_IMAGE.
Rob Bradford [Wed, 3 Jul 2013 15:19:39 +0000 (16:19 +0100)]
wayland: Create the Wayland surface for the window on impl creation
Ths allows the retrieval of the wl_surface before the window is shown.
The surface is still created in the original places since the surface
and shell surface is destroyed when the surface is programmatically
hidden.
Michael Forney [Mon, 1 Jul 2013 22:51:20 +0000 (15:51 -0700)]
wayland: Fix typo in setting of core_pointer
This typo caused the display's core_pointer to be set only if the mouse
was first in the device list.
https://bugzilla.gnome.org/show_bug.cgi?id=703434
Alexander Larsson [Wed, 3 Jul 2013 14:03:25 +0000 (16:03 +0200)]
wayland: Add custom create_similar_image implementation
The fallback method is used on other backends, but it caused
problems for wayland when it tried to create a surface for
the root window.
Alexander Larsson [Wed, 3 Jul 2013 11:26:03 +0000 (13:26 +0200)]
File chooser: Convert icons to using cairo_surface_t
Alexander Larsson [Wed, 26 Jun 2013 14:34:53 +0000 (16:34 +0200)]
GtkCellRendererPixbuf: Add surface property
Alexander Larsson [Wed, 26 Jun 2013 14:33:50 +0000 (16:33 +0200)]
GtkImage: Add new_from_surface() and set_from_surface()
Alexander Larsson [Mon, 24 Jun 2013 12:13:43 +0000 (14:13 +0200)]
GtkIconHelper: Convert to using cairo surfaces as base and support scales
We render the source into a cairo_surface_t so that we can render it
with cairo directly, rather than having to convert it from a pixbuf
every time. We also specify the target window when creating the cairo
surface so that rendering can be faster.
Using cairo surfaces also allows us to seamlessly support window scales.
We also add a GTK_IMAGE_SURFACE source type.
Alexander Larsson [Tue, 25 Jun 2013 11:59:51 +0000 (13:59 +0200)]
icon factory: Add gtk_icon_set_render_icon_surface
Support scales when falling back to loading icons from the
icon theme.
In order to actually render scaled icons we add
gtk_icon_set_render_icon_surface which renders to a cairo_surface_t
which includes whatever scaling you need for scaled icons.
Alexander Larsson [Mon, 24 Jun 2013 10:35:39 +0000 (12:35 +0200)]
stylecontext: add gtk_render_icon_surface
This draws an icon from a cairo_surface. We want to use this more rather
than render_icon as this means we can skip the pixbuf to surface
conversion (including allocation and alpha premultiplication) at
render time, plus we can use create_similar_image which may allow
faster rendering.
Alexander Larsson [Wed, 26 Jun 2013 14:26:43 +0000 (16:26 +0200)]
GtkIconTheme: Add helpers to load to cairo_surface_t
Right now this just uses the pixbuf load code and converts
it to a surface. In the future we could cache the pattern
to allow reusing the surface.
Carlos Garnacho [Fri, 10 May 2013 16:06:00 +0000 (18:06 +0200)]
icontheme: Add support for high resolution icons
An optional OutputScale integer key has been added to index.theme
subdirs description, so icon themes may provide icons that are
more suitable to render at a (typically 2x) integer upscaled
resolution. This way it is possible to make eg. a 16x16@2x icon has a
real size of 32x32, but contains a similar level of detail to the
16x16 icon so things don't look any more cluttered on high-dpi
screens.
The pixbuf lookup has changed so it prefers a minimal scale change
that yields the minimal real size difference, so if looking up for
a 16x16 icon at 2x, it would first prefer 16x16@2x, then 32x32, and
then any other icon that's closest to match
There is now *_for_scale() variants for all GtkIconTheme ways
to directly or indirectly fetch a GdkPixbuf.
This is based on code by Carlos Garnacho with changes by Alexander
Larsson
Alexander Larsson [Wed, 26 Jun 2013 09:28:33 +0000 (11:28 +0200)]
CellRendererPixbuf: Set the window on the icon helper
This lets us get scaled icons if needed.
Alexander Larsson [Tue, 25 Jun 2013 12:38:08 +0000 (14:38 +0200)]
spinbutton: set the window on the icon helper
Alexander Larsson [Tue, 25 Jun 2013 12:37:55 +0000 (14:37 +0200)]
entry: Set the window on the icon helper
Alexander Larsson [Mon, 24 Jun 2013 12:06:20 +0000 (14:06 +0200)]
GtkImage: Set the window on the gtkiconhelper
Alexander Larsson [Mon, 24 Jun 2013 12:05:27 +0000 (14:05 +0200)]
GtkIconHelper: Add set_window()
This is a hint on where the icon will be drawn. It
will allow us to pre-allocate cairo surfaces for the right
target.
Alexander Larsson [Thu, 27 Jun 2013 16:32:24 +0000 (18:32 +0200)]
gtk-demo: Add demo of hidpi css assets via -gtk-scaled()
Alexander Larsson [Thu, 27 Jun 2013 16:29:38 +0000 (18:29 +0200)]
CSS: Add -gtk-scaled(image1,image2,...) support for hidpi assets
Alexander Larsson [Thu, 27 Jun 2013 16:26:05 +0000 (18:26 +0200)]
css: Add a scale argument to css-value compute vfunc
We need to be able to compute different GtkCssImage values
depending on the scale, and we need this at compute time so that
we don't need to read any images other than the scale in used (to
e.g. calculate the image size). GtkStyleProviderPrivate is shared
for all style contexts, so its not right.
Alexander Larsson [Thu, 27 Jun 2013 16:23:17 +0000 (18:23 +0200)]
GtkWidget: Propagate scale to GtkStyleContext
Alexander Larsson [Thu, 27 Jun 2013 16:21:41 +0000 (18:21 +0200)]
GtkStyleContext: Add gtk_style_context_get/set_scale
Alexander Larsson [Mon, 24 Jun 2013 10:53:53 +0000 (12:53 +0200)]
Use gdk_cairo_surface_create_from_pixbuf when possible
Alexander Larsson [Thu, 20 Jun 2013 16:43:42 +0000 (18:43 +0200)]
Add GDK_DPI_SCALE env var
This is very useful for hidpi where the dpi is scaled to make
non-dpi aware apps larger. In that case a dpi aware gtk+ using
GDK_SCALE will be getting huge fonts. You can the set GDK_DPI_SCALE
to compensate for this.
Alexander Larsson [Wed, 3 Jul 2013 09:52:58 +0000 (11:52 +0200)]
gdk: Convert mouse position to doubles, add new getters
We've long had double precision mouse coordinates on wayland (e.g.
when rotating a window) but with the new scaling we even have it on
X (and, its also in Xinput2), so convert all the internal mouse/device
position getters to use doubles and add new accessors for the
public APIs that take doubles instead of ints.
Alexander Larsson [Mon, 1 Jul 2013 18:50:44 +0000 (20:50 +0200)]
x11: Don't follow dpi and scale from xsettings when GDK_SCALE set
If things are hardcoded in the environment, that wins.
Alexander Larsson [Fri, 28 Jun 2013 11:23:45 +0000 (13:23 +0200)]
x11: Add Gdk/UnscaledDPI to override Xft/DPI
This lets use use a scaled Xft/DPI for old apps while not
blowing up the size of scaled windows. Only apps supporting
Gdk/WindowScaleFactor should supprt Gdk/UnscaledDPI.
Alexander Larsson [Thu, 27 Jun 2013 20:45:40 +0000 (22:45 +0200)]
x11: Support the Gdk/WindowScalingFactor xsetting
This xsetting can be used to tell Gtk to use a specific window
scaling for the screen.
Alexander Larsson [Thu, 20 Jun 2013 09:40:07 +0000 (11:40 +0200)]
x11: Initial cut at supporting window scaling for X11
If you set GDK_SCALE=2 in the environment then all windows will be
scaled by 2. Its not an ideal solution as it doesn't handle
multi-monitors at different scales, and only affects gtk apps.
But it is a good starting points and will help a lot on HiDPI
laptops.
Alexander Larsson [Tue, 4 Jun 2013 09:39:36 +0000 (11:39 +0200)]
wayland: Support gdk_window_get_scale
We track the list of outputs each window is on, and set the
scale to the largest scale value of the outputs. Any time the scale
changes we also emit a configure event.
Alexander Larsson [Tue, 4 Jun 2013 09:27:56 +0000 (11:27 +0200)]
wayland: Require wayland-client 1.1.90
This has the new methods required for buffer scaling.
Alexander Larsson [Tue, 4 Jun 2013 09:18:49 +0000 (11:18 +0200)]
wayland: Implement gdk_screen_get_monitor_scale()
We bind to the newer version of the wl_output which supports
the new done and scale events, and if we use this to get the
scale for each monitor (defaulting to 1 if not supported).
Alexander Larsson [Mon, 24 Jun 2013 10:12:43 +0000 (12:12 +0200)]
gdk: Add gdk_cairo_surface_create_from_pixbuf
Alexander Larsson [Mon, 24 Jun 2013 10:10:02 +0000 (12:10 +0200)]
gdk: add gdk_window_create_similar_image_surface
This lets us create image surfaces that render faster on specific windows.
It also supports creating scaled image surfaces.
Alexander Larsson [Tue, 4 Jun 2013 08:41:44 +0000 (10:41 +0200)]
gdkwindow: Respect cairo surfaces with device scale
If a cairo_surface for a window has a device scale set we need
to respect this when creating a similar window. I.e. we want
to then automatically create a larger window which inherits
the scale from the original.
We also need to calculate a different device_offset if there
is a device_scale set.
Alexander Larsson [Tue, 4 Jun 2013 08:39:32 +0000 (10:39 +0200)]
configure: Add buildtime check for cairo_surface_set_device_scale
We will need this for the window scale support, but its not yet
in a stable cairo release (or even on a master yet), so we make
this optional.
Alexander Larsson [Mon, 3 Jun 2013 15:04:03 +0000 (17:04 +0200)]
pixel-cache: Refresh pixel cache on window scale factor changes.
Alexander Larsson [Fri, 28 Jun 2013 08:39:52 +0000 (10:39 +0200)]
widget: Track when the window scale factor changes and notify
The scale-factor property on the widgets will be notified, and the
scale will change on the style property, causing us to pick up
new css assets.
Michael Natterer [Fri, 15 Feb 2013 14:35:13 +0000 (15:35 +0100)]
gtk: add gtk_widget_get_scale_factor()
Michael Natterer [Fri, 18 Jan 2013 14:47:29 +0000 (15:47 +0100)]
quartz: Implement get_scale_factor() on screen and window
Alexander Larsson [Thu, 20 Jun 2013 17:25:45 +0000 (19:25 +0200)]
offscreenwindow: Handle window_scale
We create similar windows in the right way to get the
device scale right.
Michael Natterer [Fri, 18 Jan 2013 14:47:29 +0000 (15:47 +0100)]
add gdk_screen_ and gdk_window_get_scale_factor()
These report the internal scaling factor, mapping from UI pixels
to hardware pixels.
Alexander Larsson [Wed, 3 Jul 2013 08:59:31 +0000 (10:59 +0200)]
win32: Remove unused functions
The _gdk_windowing_* stuff is not used anymore
Alexander Larsson [Wed, 3 Jul 2013 08:56:37 +0000 (10:56 +0200)]
quartz: Remove unused functions
The _gdk_windowing_* stuff is not used anymore
Piotr Drąg [Tue, 2 Jul 2013 22:05:34 +0000 (00:05 +0200)]
Updated POTFILES.skip
Alexander Larsson [Tue, 2 Jul 2013 11:44:17 +0000 (13:44 +0200)]
listbox: Use new private model, remove priv pointer
Alexander Larsson [Tue, 2 Jul 2013 11:43:20 +0000 (13:43 +0200)]
stack: Use new private model, remove priv pointer
Alexander Larsson [Tue, 2 Jul 2013 11:42:43 +0000 (13:42 +0200)]
revealer: Use new private model, remove priv pointer
Matthias Clasen [Mon, 1 Jul 2013 17:17:51 +0000 (13:17 -0400)]
Fix a copy-paste error
Alexander Larsson [Mon, 1 Jul 2013 13:31:19 +0000 (15:31 +0200)]
gdk: Fix shaped toplevels
We need to apply the shape for toplevels that have a shape.
https://bugzilla.gnome.org/show_bug.cgi?id=702831
Alexander Larsson [Mon, 1 Jul 2013 13:00:19 +0000 (15:00 +0200)]
Fix typo in Makefile.am
Chun-wei Fan [Mon, 1 Jul 2013 12:52:45 +0000 (14:52 +0200)]
Include crypt(3) implementation for MSVC
This adds a crypt(3) implementation for use with broadwayd as Visual Studio
does not support crypt(3) out of the box.
The public domain implementation is taken from the following URL,
http://michael.dipperstein.com/crypt/, where AFAICT this implementation
would not be subject to licensing restrictions that would prevent it from
being bundled.
Chun-wei Fan [Mon, 1 Jul 2013 12:51:03 +0000 (14:51 +0200)]
Broadway: Allow Compilation on Windows/MSVC
-Don't include unistd.h unconditionally as it's not available in Visual
Studio, but include io.h where necessary.
-Avoid C99isms, and use _chsize_s in place of ftruncate when unistd.h is
not available (as in the case of Visual Studio)
Tarnyko [Mon, 1 Jul 2013 12:46:25 +0000 (14:46 +0200)]
win32: Make broadway build
Matthias Clasen [Mon, 1 Jul 2013 02:30:15 +0000 (22:30 -0400)]
Add GtkHeaderBar to the a11y tests
Matthias Clasen [Mon, 1 Jul 2013 02:16:23 +0000 (22:16 -0400)]
Add GtkStack and GtkStackSwitcher to the a11y tests
Matthias Clasen [Mon, 1 Jul 2013 02:08:58 +0000 (22:08 -0400)]
Add GtkListBox to the a11y tests
William Jon McCann [Sun, 30 Jun 2013 18:28:02 +0000 (14:28 -0400)]
Deprecate and ignore gtk-enable-tooltips setting
It is enabled by default except on touch input devices.
William Jon McCann [Sun, 30 Jun 2013 17:45:43 +0000 (13:45 -0400)]
Remove gtk-im-status-style and gtk-im-preedit-style from GDK as well
William Jon McCann [Sun, 30 Jun 2013 17:44:24 +0000 (13:44 -0400)]
Deprecate the unused gtk-file-chooser-backend setting
William Jon McCann [Sun, 30 Jun 2013 17:14:18 +0000 (13:14 -0400)]
Fix a couple of deprecation warnings related to stock items
William Jon McCann [Sun, 30 Jun 2013 16:57:44 +0000 (12:57 -0400)]
Deprecate and ignore gtk-im-status-style and gtk-im-preedit-style
William Jon McCann [Sun, 30 Jun 2013 16:15:02 +0000 (12:15 -0400)]
Add deprecation warnings to GTK_STOCK macros
William Jon McCann [Sun, 30 Jun 2013 15:30:37 +0000 (11:30 -0400)]
Fix the build
Remove references to removed files
William Jon McCann [Fri, 28 Jun 2013 19:43:51 +0000 (15:43 -0400)]
Add xpadding around the image in message dialogs
William Jon McCann [Fri, 28 Jun 2013 15:27:19 +0000 (11:27 -0400)]
Deprecate GtkAction and GtkUIManager
It is recommended to use GAction et al and GtkBuilder.
William Jon McCann [Fri, 28 Jun 2013 16:09:58 +0000 (12:09 -0400)]
Remove deprecated UIManager from the demo
William Jon McCann [Fri, 28 Jun 2013 19:02:44 +0000 (15:02 -0400)]
Port print-editor test to GtkBuilder from UIManager
Sébastien Wilmet [Sat, 29 Jun 2013 16:21:44 +0000 (18:21 +0200)]
textiter: better document "tag" functions
https://bugzilla.gnome.org/show_bug.cgi?id=703313
Matthias Clasen [Sun, 30 Jun 2013 05:28:37 +0000 (01:28 -0400)]
Add GtkListBox to the widget gallery
Matthias Clasen [Sun, 30 Jun 2013 05:02:46 +0000 (01:02 -0400)]
Add missing GtkSearchEntry API to the docs
Matthias Clasen [Sun, 30 Jun 2013 04:50:29 +0000 (00:50 -0400)]
GtkSearchBar: formatting trivia
Matthias Clasen [Sun, 30 Jun 2013 04:27:45 +0000 (00:27 -0400)]
GtkHeaderBar: documentation improvements
Add some more information about title allocation.
Matthias Clasen [Sun, 30 Jun 2013 02:06:54 +0000 (22:06 -0400)]
Avoid integer overflow
Use g_malloc_n in gdk_cairo_set_source_pixbuf when allocating
a large block of memory, to avoid integer overflow.
Pointed out by Bert Massop in
https://bugzilla.gnome.org/show_bug.cgi?id=703220
Benjamin Otte [Sun, 30 Jun 2013 01:39:09 +0000 (03:39 +0200)]
reftests: Add a reftest for the expand change in GtkBox
The change was introduced in
80513aa2c7ed4aecc235723ea6c6f044cf98ba1d
See that commit for details.
Matthias Clasen [Sun, 30 Jun 2013 00:03:29 +0000 (20:03 -0400)]
Add a --direction option to gtk-reftest
gtk_test_init() hardcodes the locale to "C", so the --direction
option is useful to check reftests in rtl.
Matthias Clasen [Sat, 29 Jun 2013 23:55:14 +0000 (19:55 -0400)]
typo fix
Matthias Clasen [Sat, 29 Jun 2013 23:24:22 +0000 (19:24 -0400)]
Add a testcase for closing display before exit
It works right now, lets keep it that way.
Matthias Clasen [Sat, 29 Jun 2013 23:23:23 +0000 (19:23 -0400)]
GdkScreenX11: Dispose visuals
If we let them hold onto their X resources until finalize,
it is too late.
Matthias Clasen [Sat, 29 Jun 2013 23:22:51 +0000 (19:22 -0400)]
GdkVisualX11: Add a dispose implementation
We need to be able to drop X resources before finalization.
Matthias Clasen [Sat, 29 Jun 2013 23:21:28 +0000 (19:21 -0400)]
GdkDeviceManagerXI2: chain up in constructed
Dispose does chain up, and the parent class' dispose expects
that the object has been fully constructed.
Matthias Clasen [Sat, 29 Jun 2013 22:18:35 +0000 (18:18 -0400)]
csd: Improve window button handling
Group the buttons on each side in a box, and give them different
style classes, so themes can differentiate (this is partially a
workaround for limitations in our css selectors). The boxes also
let us add a margin below the buttons, without affecting the
allocation of the buttons themselves.
Matthias Clasen [Sat, 29 Jun 2013 22:15:01 +0000 (18:15 -0400)]
csd: use the correct icon name for close button
The icon is called window-close-symbolic.
Matthias Clasen [Sat, 29 Jun 2013 22:09:11 +0000 (18:09 -0400)]
csd: Use a dedicated style class for window buttons
This allows themes to differentiate between regular buttons
in a title bar, and window buttons.
Matthias Clasen [Sat, 29 Jun 2013 22:02:17 +0000 (18:02 -0400)]
csd: Improve the window title
Manually create the label, so that we can set its margins.
Sébastien Wilmet [Sat, 29 Jun 2013 14:33:23 +0000 (16:33 +0200)]
textiter: doc precision for forward_search() and backward_search()
https://bugzilla.gnome.org/show_bug.cgi?id=703313
Matthias Clasen [Sat, 29 Jun 2013 12:52:04 +0000 (08:52 -0400)]
Add a titlebar testcase
This is an experiment towards how we want client-side titlebars
to look.
Matthias Clasen [Sat, 29 Jun 2013 02:19:15 +0000 (22:19 -0400)]
Add a gtk_window_close function
This is useful when adding close buttons in custom titlebars.
Matthias Clasen [Fri, 28 Jun 2013 20:08:15 +0000 (16:08 -0400)]
testheaderbar: fix a mmemonic
Matthias Clasen [Fri, 28 Jun 2013 20:01:44 +0000 (16:01 -0400)]
Trivial rewording
Make the listbox demo follow the naming convention of the
other demos.
Matthias Clasen [Fri, 28 Jun 2013 10:47:48 +0000 (06:47 -0400)]
Fix the build
We have to uglify the deprecation messages to make gtk-doc
handle them. The get turned into XML attributes, and there
is no automatic quoting to protect quotes in the text.
William Jon McCann [Thu, 27 Jun 2013 22:48:46 +0000 (18:48 -0400)]
Deprecate GtkImageMenuItem
Use GtkMenuItem for menus with only text or GMenu for those
with icons for "nouns" and just text for "verbs".
William Jon McCann [Thu, 27 Jun 2013 21:51:38 +0000 (17:51 -0400)]
Deprecate the gtk stock functions
William Jon McCann [Thu, 27 Jun 2013 02:18:01 +0000 (22:18 -0400)]
Make ignored settings be set to false by default
Rico Tzschichholz [Thu, 27 Jun 2013 19:14:07 +0000 (21:14 +0200)]
docs: Don't drop xml/gtkstock.xml
Emilio Pozuelo Monfort [Thu, 27 Jun 2013 17:01:14 +0000 (19:01 +0200)]
menushell: don't activate a menu entry when opening a big menu
If a menu is opened and it doesn't fit entirely below or above
the menu bar, gtk+ will place it on top. The button release will
then activate the popup item that happens to appear under the
cursor. Avoid this by ignoring release events if they originated
in the parent menu bar and the duration of the press was too short.
https://bugzilla.gnome.org/show_bug.cgi?id=703069
Rico Tzschichholz [Thu, 27 Jun 2013 17:43:47 +0000 (19:43 +0200)]
build: Fix make dist
Emanuele Aina [Mon, 24 Jun 2013 13:58:10 +0000 (15:58 +0200)]
docs: Add GtkListBox functions to their section and fix links
https://bugzilla.gnome.org/show_bug.cgi?id=702981